package etr.bk.db;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.h2.tools.TriggerAdapter;

public class TriggerForDefault extends TriggerAdapter {

	public void fire(Connection con, ResultSet rset, ResultSet arg2) throws SQLException {
				
		System.out.println("----Trigger Fire----");

		PreparedStatement pstat = null;
		//String remove = "TRUNCATE TABLE DefltImgTable";   AUTO COMMIT ---- scuko!!!??????
		String remove = "DELETE FROM DefltImgTable";
		
		pstat = con.prepareStatement(remove);
		
		pstat.execute();
		
		pstat.close();
		
	}
}